package com.sfdk.graphics.core
{
import com.sfdk.core.GameProxy;
import com.sfdk.graphics.enums.AbstractCursorConstant;

import flash.display.MovieClip;
import flash.ui.Mouse;

public class CursorManager
	{
		private static var instance_ : CursorManager;
		
		private var _gameProxy : GameProxy;
		
		public function CursorManager(gameProxy : GameProxy)
		{
			instance_ = this;
			_gameProxy = gameProxy;		
		}
				
		public static function get instance() : CursorManager
		{
			return instance_;
		}
		
		private var _cursor : AbstractCursorConstant;
		private var _cursorView : MovieClip;
		
		public function setCursor(cursor : AbstractCursorConstant) : void
		{
			_cursor  = cursor;	
			
			Mouse.hide();
			
			_cursorView = new cursor.cursorType();
			_cursorView.startDrag(true);
			_gameProxy.stage.addChild(_cursorView);
		}
	}
}